﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Pinia.Models.UserModel>" %>

<%if (!Request.IsAuthenticated)
              {%>
            <div id="welInfo">
                <p>
                    Welcom! <a href="javascript:void(0)" onclick="showFloat()">Login</a> or <a href="javascript:void(0)"
                        onclick="showFloatR()">Registion</a>.</p>
                <!--加一个注册层-->
                 <% using (Html.BeginForm("Register", "Account"))
                    {%>
                <div id="divRegist" style="border: solid 10px #fdffc6; background: #fff; padding: 10px;
                    width: 780px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%;
                    margin: -200px 0 0 -400px;">
                    <div style="padding: 3px 15px 3px 15px; text-align: center; vertical-align: middle;
                        margin-left: auto">
                        <div>
                            用户：
                            <%: Html.TextBoxFor(m => m.UserName)%>
                        </div>
                        <div>
                            密码：
                            <%: Html.PasswordFor(m => m.Password)%>
                        </div>
                        <div>
                            再次密码：
                            <%: Html.PasswordFor(m => m.ConfirmPassword)%>
                        </div>
                        <div>
                            邮箱地址：
                            <%: Html.TextBoxFor(m => m.Email)%>
                        </div>
                        <br />
                        <div>
                            &nbsp; &nbsp;
                            <input type="submit" id="ButtonRegist"  value=" 注 册 "  />&nbsp;
                            <input id="Button2" type="button" value=" 取 消 " onclick="ShowNo()" />
                        </div>
                    </div>
                </div>
                <%} %>
                <% using (Html.BeginForm("LogOn", "Account"))
                   {%>
                <!--加一个登录层-->
                <div id="divLogin" style="border: solid 10px #fdffc6; background: #fff; padding: 10px;
                    width: 780px; z-index: 1001; position: absolute; display: none; top: 50%; left: 50%;
                    margin: -200px 0 0 -400px;">
                    <div style="padding: 3px 15px 3px 15px; text-align: center; vertical-align: middle;
                        margin-left: auto">
                        <div>
                            用户：
                            <%: Html.TextBoxFor(m => m.UserName)%>
                        </div>
                        <div>
                            密码：
                            <%: Html.PasswordFor(m => m.Password)%>
                        </div>
                        <br />
                        <div>
                            &nbsp; &nbsp;
                            <input type="submit" id="BttLogin" value=" 登 陆 " />&nbsp;
                            <input id="BttCancel" type="button" value=" 取 消 " onclick="ShowNo()" />
                        </div>
                    </div>
                </div>
                <%} %>
                <!--加一个半透明层-->
                <div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity: 0.3;
                    background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute;
                    left: 0; top: 0; display: none; overflow: hidden;">
                </div>
            </div>      
            <%} %>
            <%else
              { %>
            <div id="welInfo">
                <p>
                    Welcom! <%: Page.User.Identity.Name %> <a href="../Account/LogOff">LogOff</a> </p>
              </div>
            <%} %>            